If your current document is in datasource "document1", you can modify the link like this:
<xp:link escape="true" text="Link" id="link1">
<xp:this.value><![CDATA[#{javascript:
var doc = document1.getDocument();
var db = doc.getParentDatabase();
var path = db.getFilePath();
var server = db.getServer();
"notes://" + server + "/" + path;
}]]></xp:this.value>
</xp:link>
Maybe the Filepath is containing backslashes. Then you have to use f.e. @ReplaceSubstring to change them to normal slashes.
Sven